﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.views {
    import flash.events.*;
    import org.robotlegs.core.*;
    import net.wooga.pets.views.components.*;
    import net.wooga.pets.constants.*;
    import org.robotlegs.mvcs.*;

    public class RenderListMediator extends Mediator implements IMediator {

        override public function onRegister():void{
            super.onRegister();
            eventMap.mapListener(eventDispatcher, EventConstants.UPDATE_RENDER_LIST, this.updateRenderList);
            eventMap.mapListener(eventDispatcher, EventConstants.UPDATE_RENDER_LIST_FOR_DRAGGING, this.updateRenderListForDragging);
            this.updateRenderList();
        }
        protected function updateRenderList(_arg1:Event=null):void{
            this.view.setVisibilityDependingOnPosition();
            this.storeViewRectangle();
        }
        protected function storeViewRectangle():void{
        }
        protected function updateRenderListForDragging(_arg1:Event=null):void{
            this.view.setVisibilityDependingOnPosition(true);
        }
        private function get view():RenderListView{
            return ((viewComponent as RenderListView));
        }

    }
}//package net.wooga.pets.views 
